//
//  BEMyOrdersViewModel.swift
//  BEGlobalOiler
//
//  Created by KKING on 16/9/14.
//  Copyright © 2016年 Bullseye Energy pte ltd. All rights reserved.
//

import UIKit

class BEMyOrdersViewModel: NSObject {

    var listOrder: BEOrderModel?
    
    var orderStatusName: String?
    var estimateAmount: String?
    var rigName: String?
    var rigLocation: String?
    var createTime: String?
    var techCount: Int?
    var talentNames: String?
    
    var orderId: Int64?
    var orderStatus: Int?
    
    init(orderModel: BEOrderModel) {
        super.init()
        self.listOrder = orderModel

        orderStatusName = orderModel.orderStatusName
        estimateAmount = "$"+"\(orderModel.estimateAmount)"
        rigName = orderModel.rigName! + "  Rig"
        rigLocation = orderModel.rigLocation
        createTime = "request date : " + dealTime(time: orderModel.orderTime)
        orderId = Int64(orderModel.id!)
        techCount = orderModel.techsCount
        orderStatus = orderModel.orderStatus
        
        talentNames = orderModel.talentNames
    }
    
    
    
    private func dealTime(time: String?) -> String {

        
        
        
        return time!
    }
    
    
}
